import { defHttp } from '@/utils/http/axios'

enum Api {
  GET_DICT_LIST_BY_CODE_DAY = '/deviceMeasure/day/page', //获取天

  UPDATE_DICT_LIST_BY_CODE_DAY = '/deviceMeasure/day/update', //更新天
  GET_DICT_LIST_BY_CODE_HOUR = '/deviceMeasure/incrementHour/page', //小时
  UPDATE_DICT_LIST_BY_CODE_HOUR = '/deviceMeasure/incrementHour/update', //小时
}

export const getDictListByCodeDay = (params) =>
  defHttp.get({ url: Api.GET_DICT_LIST_BY_CODE_DAY, params })
export const updateDictListByCodeDay = (data) =>
  defHttp.post({ url: Api.UPDATE_DICT_LIST_BY_CODE_DAY, data })

export const getDictListByCodeHour = (params) =>
  defHttp.get({ url: Api.GET_DICT_LIST_BY_CODE_HOUR, params })
export const updateDictListByCodeHour = (data) =>
  defHttp.post({ url: Api.UPDATE_DICT_LIST_BY_CODE_HOUR, data })
